package com.qy.model;

import org.springframework.stereotype.Component;

@Component("pagemodel")
public class PageModel {
	private int currentPage;// 当前页

	private int pageSize=10;// 每页多少条数据

	private int totalSize;// 总条数

	private int totalPage;// 总页数

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalSize() {
		return totalSize;
	}

	public void setTotalSize(int totalSize) {
		this.totalSize = totalSize;
		if(totalSize%pageSize==0){
			this.totalPage=totalSize/pageSize;
		}else{
			this.totalPage=totalSize/pageSize+1;
		}
		
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

}
